perl add to array

164

perl add to array -

# Basic syntax:
|             Function            |                  Meaning                  |
|:-------------------------------:|:-----------------------------------------:|
|    push(@array, "some value")   |     add a value to the end of the list    |
|   $popped_value = pop(@array)   |  remove a value from the end of the list  |
| $shifted_value = shift (@array) | remove a value from the front of the list |
|  unshift(@array, "some value")  |    add a value to the front of the list   |

Comments

Submit
0 Comments